package com.nakamachizu.util;

import java.util.Calendar;

public class CalendarUtil {

    public static String format(Calendar cal){
        StringBuffer buf = new StringBuffer();
        
        int y = cal.get(Calendar.YEAR);
        int m = cal.get(Calendar.MONTH);
        int d = cal.get(Calendar.DAY_OF_MONTH);
        int h = cal.get(Calendar.HOUR_OF_DAY);
        int mi = cal.get(Calendar.MINUTE);
        int s = cal.get(Calendar.SECOND);
        
        buf.append(y).append("/").append(m).append("/").append(d)
           .append(" ").append(h).append(":").append(mi).append(":").append(s);

        return buf.toString();
    }
}
